@mixin snapcraft-snap-details {
  $asciinema-background: #121314;

  @media screen and (max-width: $breakpoint-small) {
    .snapcraft-snap-details {
      &__snippet {
        margin-left: -4.5rem !important;
      }
    }
  }

  .p-snap-details__media {
    // videos holder
    .p-snap-details__media-items {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;

      .p-carousel__item--screenshot {
        display: flex;
        flex-grow: 0;
        height: auto;
        margin-bottom: $spv-outer--medium;
        max-height: 90px;
        overflow: hidden;
      }

      &.is-small {
        .p-carousel__item--screenshot {
          max-height: 128px;
        }
      }

      .p-carousel__item--screenshot img,
      .p-carousel__item--screenshot video {
        align-self: center;
        width: 100%;
      }

      @media screen and (max-width: $breakpoint-medium) {
        flex-direction: row;
        flex-wrap: wrap;
        margin-bottom: -$spv-outer--medium;
        margin-right: -$sph-outer;
        margin-top: $spv-outer--medium;

        .p-carousel__item--screenshot {
          margin-bottom: $spv-outer--medium;
          margin-right: $sph-outer;
          max-height: 100%;
          max-width: 129px;
        }
      }

      @media screen and (max-width: $breakpoint-x-small) {
        .p-carousel__item--screenshot {
          max-width: calc(50% - 1rem);
        }
      }
    }

    iframe {
      margin-bottom: 0;
    }

    .asciicast {
      margin: 0 auto !important;
      position: relative;

      &::before {
        background: $asciinema-background;
        bottom: 1.5rem;
        content: ' ';
        display: block;
        left: 0;
        position: absolute;
        right: 0;
        top: 0;
      }

      iframe {
        position: relative;
      }
    }
  }

  .snapcraft-details-preview {
    [data-live="public_metrics_live"] {
      position: relative;

      &::after {
        align-items: center;
        bottom: 0;
        content: "This content is being displayed for preview purposes";
        display: flex;
        justify-content: center;
        left: 0;
        position: absolute;
        right: 0;
        top: 0;
      }
    }

    .snapcraft-territories,
    .snapcraft-distro-chart {
      opacity: .3;
    }
  }
}
